#!/usr/bin/env python
# -*- coding:utf-8 -*-

from multiprocessing import Pool

def f(x):
    return x*x

if __name__ == '__main__':
    with Pool(5) as p:
        print(p.map(f, [1, 2, 3]))
        print(p.map(f, [1, 2, 3]))
        print('aaa')
        res = p.apply_async(f, 99)
        print(res)